<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<style>
			.active {
				color: red;
			}
		</style>
	</head>
	<body>
		<script src="../js/vue.js"></script>
		<div id="app">
			<h2 v-bind:class="{active:isActive,line:isLine}">{{message}}</h2>
			<button v-on:click="btnClick">切换颜色</button>
		</div>

		<script>
			const app = new Vue({
				el: '#app',
				data: {
					message: '你好啊',
					url: '<a href="www.baidu.com">百度一下</a>',
					isActive: true,
					isLine: true,
				},
				methods: {
					btnClick: function () {
						this.isActive = !this.isActive
					},
				},
			})
		</script>
	</body>
</html>
